home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / pluginy Firefox / 60750 / 60750.xpi / chrome / chromeFiles / content / btBoom_collegehumor.xul next >
Extensible Markup Language  |  2010-01-20  |  6KB  |  149 lines

  1. <?xml version="1.0"?>
  2. <?xml-stylesheet href="bindings/btfeedreader3.css" type="text/css"?>
  3. <?xml-stylesheet href="bindings/btbutton.css" type="text/css"?>
  4. <?xml-stylesheet href="bindings/btboombutton.css" type="text/css"?>
  5. <?xml-stylesheet href="bindings/bttoolbarbutton.css" type="text/css"?>
  6. <?xml-stylesheet href="bindings/btsearchbar3.css" type="text/css"?>
  7. <!DOCTYPE overlay [
  8. <!ENTITY % btClientDTD SYSTEM "../locale/btClient.dtd">
  9. <!ENTITY % btBoomDTD SYSTEM "../locale/btBoom_collegehumor.dtd">
  10. %btClientDTD;
  11. %btBoomDTD;
  12. ]>
  13. <overlay
  14.     xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
  15.     xmlns:html="http://www.w3.org/1999/xhtml">
  16.   <script type="application/x-javascript;version=1.7">
  17.   (function (brandObject) {
  18.     function firstRun() {
  19.       function updateToolbar() {
  20.         var xhr = new XMLHttpRequest();
  21.         xhr.open('GET', brandObject.toolbarUpdateURL, true);
  22.         xhr.onload = function() {
  23.           try {
  24.             var tbitems = brandObject.utilities.JSON.parse(xhr.responseText);
  25.              for (let i in tbitems) {
  26.               var tbitem = document.getElementById(i);
  27.               for (let j in tbitems[i]) {
  28.                 tbitem.setAttribute(j, tbitems[i][j]);
  29.               }
  30.             }
  31.           } catch (ex) {
  32.             /* Invalid JSON - just ignore */
  33.           }
  34.         }
  35.         xhr.send(null);
  36.       }
  37.       function attrChange(event) {
  38.         if (event.attrName == "collapsed") {
  39.           if (event.attrChange == event.REMOVAL) {
  40.             updateToolbar();
  41.           }
  42.         }
  43.       }
  44.       if (brandObject.toolbarUpdateURL) {
  45.         updateToolbar();
  46.         window.setInterval(updateToolbar, 900000);
  47.         document.getElementById("bt-&btBoom;-toolbar").addEventListener("DOMAttrModified", attrChange, false);
  48.       }
  49.       window.removeEventListener("load", firstRun, false);
  50.     }
  51.     window.addEventListener("load", firstRun, false);
  52.   })(BrandThunder.clients["&btClient;"]);
  53.   (function (brandObject) {
  54.     try {
  55.       BrandThunder.initialize(brandObject);
  56.     } catch (ex) {}
  57.     function firstRun() {
  58.       if (document.getElementById("bt-&btBoom;-feedreader")) {
  59.         document.getElementById("bt-&btBoom;-feedreader").startFeedRotation();
  60.       }
  61.       if (document.getElementById("bt-&btBoom;-countdown")) {
  62.         document.getElementById("bt-&btBoom;-countdown").startCountdown();
  63.       }
  64.       window.removeEventListener("load", firstRun, false);
  65.     }
  66.     window.addEventListener("load", firstRun, false);
  67.   })(BrandThunder.clients["&btClient;"]);
  68.   </script>
  69.   <toolbox id="navigator-toolbox" bttoolbar="true">
  70.     <!-- Toolbar ID must be unique to this toolbar -->
  71.     <toolbar id="bt-&btBoom;-toolbar"
  72.               insertafter="nav-bar"
  73.               bt-toolbarname="&toolbar.label;"
  74.               class="bt_toolbar chromeclass-toolbar"
  75.               context="toolbar-context-menu"
  76.               hidden="false"
  77.               btClientShortName="&btBoom;"
  78.               persist="hidden">
  79.       <!-- Customize buttons here -->
  80.       <btboombutton id="bt-&btBoom;-boombutton"
  81.                        brand="&btClient;"
  82.                        image="&btBoom;.png"
  83.                        btBoomBundle="btBoomBundle_&btBoom;"/>
  84.       <btsearchbar3 brand="&btClient;"
  85.                      id="bt-&btBoom;-searchbar"/>
  86.       <bttoolbarbutton id="bt-&btBoom;-button-choriginals"
  87.                        brand="&btClient;"
  88.                        btBoomBundle="btBoomBundle_&btBoom;"
  89.                        class="bt-default bt-buttonbar bt-buttonbar-start"/>
  90.       <bttoolbarbutton id="bt-&btBoom;-button-pictures"
  91.                        brand="&btClient;"
  92.                        btBoomBundle="btBoomBundle_&btBoom;"
  93.                        class="bt-default bt-buttonbar"/>
  94.       <bttoolbarbutton id="bt-&btBoom;-button-bestof"
  95.                        brand="&btClient;"
  96.                        btBoomBundle="btBoomBundle_&btBoom;"
  97.                        class="bt-default bt-buttonbar"/>
  98.       <bttoolbarbutton id="bt-&btBoom;-button-articles"
  99.                        brand="&btClient;"
  100.                        btBoomBundle="btBoomBundle_&btBoom;"
  101.                        class="bt-default bt-buttonbar"/>
  102.       <bttoolbarbutton id="bt-&btBoom;-button-cutegirls"
  103.                        brand="&btClient;"
  104.                        btBoomBundle="btBoomBundle_&btBoom;"
  105.                        class="bt-default bt-buttonbar"/>
  106.       <bttoolbarbutton id="bt-&btBoom;-button-video"
  107.                        brand="&btClient;"
  108.                        btBoomBundle="btBoomBundle_&btBoom;"
  109.                        class="bt-default bt-buttonbar"/>
  110.       <bttoolbarbutton id="bt-&btBoom;-button-sidebar"
  111.                        brand="&btClient;"
  112.                        btBoomBundle="btBoomBundle_&btBoom;"
  113.                        class="bt-default bt-buttonbar bt-buttonbar-end"/>
  114.       <toolbarspring/>
  115.       <bttoolbarbutton id="bt-&btClient;-button-facebook"
  116.                        brand="&btClient;"
  117.                        btBoomBundle="btClientBundle_&btClient;"
  118.                        bt-url="http://www.facebook.com/CollegeHumor"
  119.                        class="bt-social-button"/>
  120.       <bttoolbarbutton id="bt-&btClient;-button-twitter"
  121.                        brand="&btClient;"
  122.                        btBoomBundle="btClientBundle_&btClient;"
  123.                        bt-url="http://twitter.com/CollegeHumor"
  124.                        class="bt-social-button"/>
  125.       <btbutton brand="&btClient;"
  126.                 btBoomBundle="btBoomBundle_&btBoom;"
  127.                 btClientBundle="btClientBundle_&btClient;"/>
  128.     </toolbar>
  129.   </toolbox>
  130.   <menupopup id="viewSidebarMenu">
  131.     <menuitem id="bt-&btBoom;-sidebar-menu" label="&sidebar.label;" observes="bt-&btBoom;-sidebar"/>
  132.   </menupopup>
  133.   <broadcasterset id="mainBroadcasterSet">
  134.     <broadcaster id="bt-&btBoom;-sidebar"
  135.                  autoCheck="false"
  136.                  type="checkbox"
  137.                  group="sidebar"
  138.                  sidebarurl="chrome://&btClient;boom/content/btSidebar.xul"
  139.                  sidebartitle="&sidebar.label;"
  140.                  brand="&btClient;"
  141.                  btBoomBundle="btBoomBundle_&btBoom;"
  142.                  oncommand="toggleSidebar('bt-&btBoom;-sidebar');if (!event.target.hasAttribute('checked')) document.getElementById('main-window').removeAttribute('btSidebar');"/>
  143.   </broadcasterset>
  144.   <stringbundleset id="stringbundleset">
  145.     <stringbundle id="btBoomBundle_&btBoom;" 
  146.         src="chrome://&btClient;boom/locale/btBoom_&btBoom;.properties"/>
  147.   </stringbundleset>
  148. </overlay>
  149.